package com.qsboss.demo.service.impl;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.qsboss.demo.mapper.TbPromptMapper;
import com.qsboss.demo.pojo.TbPrompt;
import com.qsboss.demo.service.TbPromptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author 军哥
 * @version 1.0
 * @description: 催款处理服务层
 * @date 2023/10/25 10:36
 */

@Service
public class TbPromptServiceImpl implements TbPromptService {

    @Autowired
    TbPromptMapper tbPromptMapper;

    @Override
    public PageInfo getPromptByPage(Integer pageNum, Integer pageSize) {

        PageHelper.startPage(pageNum, pageSize);

        Page<TbPrompt> promptByPage = tbPromptMapper.getPromptByPage();

        return new PageInfo(promptByPage);
    }

    @Override
    public Integer addPrompt(TbPrompt tbPrompt) {
        return tbPromptMapper.addPrompt(tbPrompt);
    }
}
